﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using System.Data.OleDb;
using System.Web;

namespace DataProvider
{
    public class ConnStringProvider
    {
        private static string _connstring = "";
        public static OleDbConnection COORDDB
        {
            get {
                if (string.IsNullOrEmpty(_connstring))
                {
                    string dbName = ConfigurationManager.AppSettings["COORDDB"];
                    _connstring = ConfigurationManager.ConnectionStrings["COORDDB"].ConnectionString;
                    _connstring = _connstring.Replace(dbName, HttpContext.Current.Server.MapPath(dbName));
                }
                return new OleDbConnection(_connstring);
            
            }
        }
    }
}
